def setName(self,newName):
    self.name = newName
from types import MethodType
cs.setName = MethodType(setName,cs)
s3 = cs()
s3.setName('S3')
print(cs.name)

print(getattr(s3,"name"))
print(getattr(cs,"name"))
print(getattr(cs,'setName'))
print(getattr(s3,'setName'))